<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>3</title>
		<script type="text/javascript">
function su(){
var a1=prompt("请输入第一个数：","");
var a2=prompt("请输入第二个数：","");
var a3=prompt("请输入运算符：","");
var b1=parseInt(a1);var b2=parseInt(a2);
if (a3=="*") {
	document.write(b1*b2);
} else if(a3=="/"){
	document.write(b1/b2);
}else if(a3=="+"){
	document.write(b1+b2);
}else if(a3=="-"){
	document.write(b1-b2);
}
}
</script>
	</head>
	<body>
		<input name="btn" type="button" value="计算值" onclick="su()"/>
	</body>
</html>
